﻿@using Nop.Core
@using Nop.Core.Domain.Seo

@model ActiveDiscussionsModel

@inject SeoSettings seoSettings
@inject IWebHelper webHelper

@{
    Layout = "_ColumnsOne";

    //title
    NopHtml.AddTitleParts(T("Forum.PageTitle.ActiveDiscussions").Text);
    //page class
    NopHtml.AppendPageCssClassParts("html-active-discussions-page");

    //canonical URL
    if (seoSettings.CanonicalUrlsEnabled)
    {
        var activeDiscussionsUrl = Model.TopicPageIndex > 0 ?
            Url.RouteUrl(NopRouteNames.Standard.ACTIVE_DISCUSSIONS_PAGED, new { pageNumber = Model.TopicPageIndex + 1 }, webHelper.GetCurrentRequestProtocol()).ToLowerInvariant() :
            Url.RouteUrl(NopRouteNames.Standard.ACTIVE_DISCUSSIONS, null, webHelper.GetCurrentRequestProtocol()).ToLowerInvariant();

        NopHtml.AddCanonicalUrlParts(activeDiscussionsUrl, seoSettings.QueryStringInCanonicalUrlsEnabled);
    }
}
<div class="page active-discussions-page">
    @await Component.InvokeAsync(typeof(ForumBreadcrumbViewComponent))
    @await Html.PartialAsync("_ForumHeader")
    @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.BoardsActivediscussionsAfterHeader, additionalData = Model })
    @await Html.PartialAsync("_ActiveTopics", Model)
    @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.BoardsActivediscussionsAfterTopics, additionalData = Model })
</div>
